//package office.docx4j;
//
//import java.io.File;
//import java.io.FileNotFoundException;
//import java.io.FileOutputStream;
//import java.io.IOException;
//
//import org.docx4j.documents4j.local.Documents4jLocalServices;
//import org.docx4j.openpackaging.exceptions.Docx4JException;
//
//import com.documents4j.api.DocumentType;
//
//public class WordTest {
//
//    public static void main(String[] args) throws IOException, Docx4JException {
//        File output = new File("D:\\codespace\\alldemo\\java-test-project\\templates\\测试.pdf");
//        FileOutputStream fos = new FileOutputStream(output);
//
//        Documents4jLocalServices exporter = new Documents4jLocalServices();
//        exporter.export(new File("D:\\codespace\\alldemo\\java-test-project\\templates\\测试.doc") , fos, DocumentType.MS_WORD);
//
//        fos.close();
//    }
//
//    public static void test2() throws IOException, Docx4JException {
//        File output = new File("D:\\codespace\\alldemo\\java-test-project\\templates\\测试.pdf");
//        FileOutputStream fos = new FileOutputStream(output);
//
//        Documents4jLocalServices exporter = new Documents4jLocalServices();
//        exporter.export(new File("D:\\codespace\\alldemo\\java-test-project\\templates\\测试.doc") , fos, DocumentType.MS_WORD);
//
//        fos.close();
//    }
//
//}
